<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/mui.css" />
		<link rel="stylesheet" type="text/css" href="css/default.css" />
		<link rel="stylesheet" type="text/css" href="css/style1.css" />
		<style type="text/css">
		html,body{
			height:100%;
		}
			.mui-content {
				background-color: #222222;
				height:100%;
			}
			
			.welcome {
				padding: 40px 0 20px 30px;
			}
			/*label*/
			
			label {
				padding-left: 30px;
				width: 80px;
				height: 18px;
			}
			
			.showPlaceholder .placeholder {
				cursor: text;
				visibility: visible;
			}
			
			.placeholdermargintoprandom {
				margin-top: 14px;
				_margin-top: 14px;
			}
			
			.placeholder {
				background: transparent;
				color: #999999;
				font-size: 14px;
				left: 0;
				line-height: 14px;
				_line-height: 16px;
				position: absolute;
				margin-left: 57px;
				visibility: hidden;
			}
			/*小span*/
			
			.randomSpan {
				display: block;
				margin-top: 5px;
				border-radius: 18px;
				background-color: #FFFFFF;
				color: #272727;
				text-align: center;
				position: absolute;
				right: 0;
				top: -6px;
				padding: 6px 14px;
				font-size: 12px;
			}
			
			.white14 {
				font-size: 14px;
			}
			
			.regbtn {
				width: 80%!important;
				line-height: 30px!important;
				background-color: #666 !important;
				padding: 0 5px;
				border-radius: 20px!important;
				border: none;
				border: 1px solid #666!important;
			}
			
			input[type='button'] {
				color: #FFFFFF;
			}
			
			input[type='text'],
			input[type='password'] {
				color: white;
				background-color: #222222;
				border: none;
				border-bottom: 1px solid #fff;
				border-radius: 0;
				padding: 0;
			}

			.hps-logo-content {
					margin: 20px 25px;
			}
			.hps-ui-agreement {
				position: absolute;
				bottom: 15px;
				width: 100%;
				text-align: center;
				font-size: 12px;
			}
			.hps-ui-agreement span{
				color: #fff;
			}
			.hps-info{
				color: #E0E0E0;
				font-size: 12px;
			}
		</style>
	</head>

	<body>

		<header class="mui-bar mui-bar-nav" id='header'>
			<h1 class="mui-title white-big">设置昵称</h1>
		</header>
		<div class="mui-content mb0">
			<p class="white welcome">昵称</p>
			<div class="hps-logo-content">
			
			<div class="tc hps-position-rel">
				<input class="iptStyle mgsCode" autocomplete="off" data-value="" value="" title="获取验证码" placeholder="取个好听的名字吧" type="text" id="msgName" name="msgcode" maxlength="16" tabindex="2">
			</div>
			<p class="hps-info">2-15字</p>
			<p class="hps-info">只能使用中英文、数字、下划线</p>
			<p class="hps-info">30天内只能修改一次</p>
			<div class="tc hps-position-rel mt20">
				<input type="button" name="regbtn" id="regbtn" value="完成" class="white14 regbtn" onclick="mlogin()" />
				<!-- <input type="button" name="regbtn2" id="regbtn2" value="首页" class="white14 regbtn" style="margin-top: 5px;" onclick="topagej('home')" /> -->
			</div>
			</div>
			
		
		</div>
		<script src="js/mui.min.js"></script>
		<script src="js/setfontsize.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/config.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/jquery-2.1.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			mui.init()
			function mlogin() {
				var msgName = $("#msgName").val();
				if(msgName === null) {
					alert("昵称不能为空");
					return false;
				}
				mui.ajax(userurl + '/api/user/app/mLogin', {
					data: {
					
						msgCode: msgName
					},
					dataType: 'json',
					type: 'post',
					success: function(data) {
						if(data.code == 1) {
							localStorage.setItem("uid", data.data.uid);
							/*mui.openWindow({
							   url: 'person1.html'
							});*/
							//location.href="person1.html";
							topagej('back');
						} else {
							mui.toast('登陆失败', {
								duration: '2000ms',
								type: 'div'
							})
						}

					},

					error: function(xhr, type, errorThrown) {
						//异常处理；
						console.log(type);
					}
				});
			}

		</script>
	</body>

</html>